<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Sites</title>
<link href="/css/admin.css" rel="stylesheet" type="text/css" />
<script src="/js/jquery-1.5.1.min.js" type="text/javascript"></script>
<script type="text/javascript">
	$(function () {
		$('.commonTable tr').hover(function () {
			$(this).css('background-color', '#ffffae');
		},
        function () {
        	$(this).css('background-color', '#FFFFFF');
        });
       });
	function adduser()
	{
		window.location = "/cms/adduser";
	}
	function edituser(sid)
	{
		window.location = "/cms/edituser/" + sid;
	}
	function deluser(sid)
	{
		if(confirm('确定删除？'))
			window.location = "/cms/users/del/" + sid;
	}
	function viewroles(uid){
		window.location = "/cms/userroles/" + uid;
	}
</script>
</head>
<body>
	<div class="listTitle">人员管理</div>
	<div class="btnDiv"><input type="button" value="添加人员" onclick="adduser()" /></div>
	<div><table class="commonTable" width="600" cellspacing="0" cellpadding="5" >
	    <tr>
		    <th>用户名</th>
			<th>姓名</th>
			<th>角色</th>			
		    <th width="60" >
		    </th>
	    </tr>
		<?php foreach ($query->result_array() as $row){?>
			<tr>
			<td><?=$row['uid']?></td>
			<td><?=$row['uname']?></td>
			<td><a href="javascript:viewroles('<?=$row['uid']?>')" >查看</a></td>
			<td><a href="javascript:edituser('<?=$row['uid']?>')">编辑</a>&nbsp;<a href="javascript:deluser('<?=$row['uid']?>') ">删除</a></td>
			</tr>
		<?php } ?>
	</table></div>
</body>
</html>